package cn.com.dhcc.fornew.pet.vo.wapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import cn.com.dhcc.app.core.component.db.WappedResultSet;
import cn.com.dhcc.fornew.pet.vo.Dog;

public class DogRowWapper implements RowMapper<Dog>{

	@Override
	public Dog mapRow(ResultSet rss, int rowNum) throws SQLException {
		WappedResultSet rs = new WappedResultSet(rss);
		Dog vo = new Dog();
		vo.setId(rs.getString("id"));
		vo.setName(rs.getString("name"));
		vo.setAge(rs.getInteger("age"));
		vo.setBirthday(rs.getTimestamp("birthday"));
		vo.setColor(rs.getString("color"));
		vo.setSex(rs.getString("sex"));
		vo.setCreated(rs.getTimestamp("created"));
		return vo;
	}

}
